home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
lang
/
SmallEiffel.lha
/
SmallEiffel
/
bin_c
/
short8.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-22
|
17KB
|
832 lines
/*
-- ANSI C code generated by :
-- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79) --
-- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
-- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
-- http://www.loria.fr/SmallEiffel --
*/
#include "short.h"
void r323add_last(T323* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if(((C)->_capacity/*4*/)<((r323count(C))+(1))){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_capacity=16;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r322realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI]*/
}
/*FI]*/
C->_upper=((C)->_upper/*8*/)+(1);
/*[IRF3.6put*/{T323* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*8*/;
((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
}/*]*/
}
T6 r323valid_index(T323* C,T2 a1){
T6 R=0;
R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
return R;
}
T2 r323count(T323* C){
T2 R=0;
R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
return R;
}
/*No:ARRAY[RUN_CLASS].lower*/
T6 r323fast_has(T323* C,T0* a1){
T6 R=0;
R=r323valid_index(C,r323fast_index_of(C,a1));
return R;
}
T2 r323fast_index_of(T323* C,T0* a1){
T2 R=0;
R=((C)->_lower/*12*/)+(r322fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
return R;
}
/*No:ARRAY[RUN_CLASS].upper*/
/*No:ARRAY[RUN_CLASS].capacity*/
/*No:ARRAY[RUN_CLASS].put*/
/*No:ARRAY[RUN_CLASS].storage*/
T0* r50twin(T50* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T50*)R)=M50;
r50copy(((T50*)R),((T0*)C));
return R;
}
/*No:ARRAY[ASSERTION].clear_all*/
void r50add_last(T50* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if(((C)->_capacity/*4*/)<((r50count(C))+(1))){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_capacity=16;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r51realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI]*/
}
/*FI]*/
C->_upper=((C)->_upper/*8*/)+(1);
/*[IRF3.6put*/{T50* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*8*/;
((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
}/*]*/
}
/*No:ARRAY[ASSERTION].set_all_with*/
T0* r50item(T50* C,T2 a1){
T0* R=NULL;
R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
return R;
}
T6 r50valid_index(T50* C,T2 a1){
T6 R=0;
R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
return R;
}
T2 r50count(T50* C){
T2 R=0;
R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
return R;
}
/*No:ARRAY[ASSERTION].lower*/
T6 r50fast_has(T50* C,T0* a1){
T6 R=0;
R=r50valid_index(C,r50fast_index_of(C,a1));
return R;
}
void r50make(T50* C,T2 a1,T2 a2){
T2 _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*[IF*/
if((_needed)>(0)){
/*[IF*/
if(((C)->_capacity/*4*/)<(_needed)){
C->_storage=calloc(_needed,sizeof(T0*));
C->_capacity=_needed;
}
else{
/*[IRF3.6clear_all*/{T50* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T50* C2=C1;
T0* c1=__value;
r51set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI]*/
}
/*FI]*/
}
T2 r50fast_index_of(T50* C,T0* a1){
T2 R=0;
R=((C)->_lower/*12*/)+(r51fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
return R;
}
/*No:ARRAY[ASSERTION].upper*/
void r50clear(T50* C){
C->_upper=((C)->_lower/*12*/)-(1);
}
void r50copy(T50* C,T0* a1){
T2 _needed_capacity=0;
C->_lower=(((T50*)a1))->_lower/*12*/;
C->_upper=(((T50*)a1))->_upper/*8*/;
_needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
/*[IF*/
if(((C)->_capacity/*4*/)<(_needed_capacity)){
C->_capacity=_needed_capacity;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
/*FI]*/
/*[IF*/
if((_needed_capacity)>(0)){
r51copy_from((C)->_storage/*0*/,(((T50*)a1))->_storage/*0*/,(_needed_capacity)-(1));
}
/*FI]*/
}
T6 r50empty(T50* C){
T6 R=0;
R=(r50count(C))==(0);
return R;
}
/*No:ARRAY[ASSERTION].capacity*/
/*No:ARRAY[ASSERTION].put*/
/*No:ARRAY[ASSERTION].storage*/
/*No:ARRAY[E_REQUIRE].clear_all*/
void r315add_last(T315* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if(((C)->_capacity/*4*/)<((r315count(C))+(1))){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_capacity=16;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r316realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI]*/
}
/*FI]*/
C->_upper=((C)->_upper/*8*/)+(1);
/*[IRF3.6put*/{T315* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*8*/;
((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
}/*]*/
}
/*No:ARRAY[E_REQUIRE].set_all_with*/
T0* r315item(T315* C,T2 a1){
T0* R=NULL;
R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
return R;
}
T6 r315valid_index(T315* C,T2 a1){
T6 R=0;
R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
return R;
}
T2 r315count(T315* C){
T2 R=0;
R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
return R;
}
/*No:ARRAY[E_REQUIRE].lower*/
T6 r315fast_has(T315* C,T0* a1){
T6 R=0;
R=r315valid_index(C,r315fast_index_of(C,a1));
return R;
}
void r315make(T315* C,T2 a1,T2 a2){
T2 _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*[IF*/
if((_needed)>(0)){
/*[IF*/
if(((C)->_capacity/*4*/)<(_needed)){
C->_storage=calloc(_needed,sizeof(T0*));
C->_capacity=_needed;
}
else{
/*[IRF3.6clear_all*/{T315* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T315* C2=C1;
T0* c1=__value;
r316set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI]*/
}
/*FI]*/
}
T2 r315fast_index_of(T315* C,T0* a1){
T2 R=0;
R=((C)->_lower/*12*/)+(r316fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
return R;
}
/*No:ARRAY[E_REQUIRE].upper*/
void r315clear(T315* C){
C->_upper=((C)->_lower/*12*/)-(1);
}
T6 r315empty(T315* C){
T6 R=0;
R=(r315count(C))==(0);
return R;
}
/*No:ARRAY[E_REQUIRE].capacity*/
/*No:ARRAY[E_REQUIRE].put*/
/*No:ARRAY[E_REQUIRE].storage*/
T0* r226twin(T226* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T226*)R)=M226;
r226copy(((T226*)R),((T0*)C));
return R;
}
void r226add_last(T226* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if(((C)->_capacity/*4*/)<((r226count(C))+(1))){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_capacity=16;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r227realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI]*/
}
/*FI]*/
C->_upper=((C)->_upper/*8*/)+(1);
/*[IRF3.6put*/{T226* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*8*/;
((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
}/*]*/
}
T0* r226item(T226* C,T2 a1){
T0* R=NULL;
R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
return R;
}
T2 r226count(T226* C){
T2 R=0;
R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
return R;
}
/*No:ARRAY[WHEN_ITEM].lower*/
/*No:ARRAY[WHEN_ITEM].upper*/
void r226copy(T226* C,T0* a1){
T2 _needed_capacity=0;
C->_lower=(((T226*)a1))->_lower/*12*/;
C->_upper=(((T226*)a1))->_upper/*8*/;
_needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
/*[IF*/
if(((C)->_capacity/*4*/)<(_needed_capacity)){
C->_capacity=_needed_capacity;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
/*FI]*/
/*[IF*/
if((_needed_capacity)>(0)){
r227copy_from((C)->_storage/*0*/,(((T226*)a1))->_storage/*0*/,(_needed_capacity)-(1));
}
/*FI]*/
}
/*No:ARRAY[WHEN_ITEM].capacity*/
/*No:ARRAY[WHEN_ITEM].put*/
/*No:ARRAY[WHEN_ITEM].storage*/
void r350clear_all(T350* C){
T0* _value=NULL;
/*[IRF3.6set_all_with*/{T350* C1=C;
T0* b1=_value;
r250set_all_with((C1)->_storage/*4*/,b1,(C1)->_upper/*12*/);
}/*]*/
}
/*No:FIXED_ARRAY[TYPE].set_all_with*/
T2 r350count(T350* C){
T2 R=0;
R=((C)->_upper/*12*/)+(1);
return R;
}
void r350resize(T350* C,T2 a1){
T0* _elt_default=NULL;
T2 _i=0;
T2 _new_capacity=0;
/*[IF*/
if((a1)<=(r350count(C))){
C->_upper=(a1)-(1);
}
else{
_new_capacity=a1;
/*[IF*/
if(((C)->_capacity/*8*/)<(_new_capacity)){
/*[IF*/
if(((C)->_capacity/*8*/)==(0)){
C->_storage=calloc(_new_capacity,sizeof(T0*));
}
else{
C->_storage=r250realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
}
/*FI]*/
C->_capacity=_new_capacity;
}
/*FI]*/
_new_capacity=(C)->_upper/*12*/;
C->_upper=(a1)-(1);
_i=(C)->_upper/*12*/;
while (!((_i)==(_new_capacity))) {
/*[IRF3.6put*/{T350* C1=C;
T0* b1=_elt_default;
T2 b2=_i;
((C1)->_storage/*4*/)[b2]=(b1);
}/*]*/
_i=(_i)-(1);
}
}
/*FI]*/
}
void r350make(T350* C,T2 a1){
/*[IF*/
if((a1)==(0)){
C->_upper=-(1);
}
else if(((C)->_capacity/*8*/)==(0)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
C->_upper=(a1)-(1);
}
else if(((C)->_capacity/*8*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
C->_upper=(a1)-(1);
}
else{
C->_upper=(a1)-(1);
r350clear_all(C);
}
/*FI]*/
}
/*No:FIXED_ARRAY[TYPE].upper*/
/*No:FIXED_ARRAY[TYPE].capacity*/
/*No:FIXED_ARRAY[TYPE].put*/
/*No:FIXED_ARRAY[TYPE].storage*/
void r352with_capacity(T352* C,T2 a1){
/*[IF*/
if(((C)->_capacity/*8*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI]*/
C->_upper=-(1);
}
T0* r352twin(T352* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T352*)R)=M352;
r352copy(((T352*)R),((T0*)C));
return R;
}
void r352add_last(T352* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
C->_upper=((C)->_upper/*12*/)+(1);
}
else if(((C)->_capacity/*8*/)==(0)){
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else{
_new_capacity=(2)*((C)->_capacity/*8*/);
C->_storage=r353realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((C)->_upper/*12*/)+(1);
}
/*FI]*/
/*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
/*]*/
}
/*No:FIXED_ARRAY[ADDRESS_OF].item*/
/*No:FIXED_ARRAY[ADDRESS_OF].upper*/
void r352copy(T352* C,T0* a1){
T2 _new_capacity=0;
T2 _other_upper=0;
_other_upper=(((T352*)a1))->_upper/*12*/;
/*[IF*/
if((_other_upper)>=(0)){
_new_capacity=(_other_upper)+(1);
/*[IF*/
if(((C)->_capacity/*8*/)<(_new_capacity)){
C->_capacity=_new_capacity;
C->_storage=calloc(_new_capacity,sizeof(T0*));
}
else if(((C)->_capacity/*8*/)>(0)){
r353clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
}
/*FI]*/
r353copy_from((C)->_storage/*4*/,(((T352*)a1))->_storage/*4*/,_other_upper);
}
else if(((C)->_capacity/*8*/)>(0)){
r353clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
}
/*FI]*/
C->_upper=_other_upper;
}
/*No:FIXED_ARRAY[ADDRESS_OF].capacity*/
/*No:FIXED_ARRAY[ADDRESS_OF].put*/
/*No:FIXED_ARRAY[ADDRESS_OF].storage*/
void r64with_capacity(T64* C,T2 a1){
/*[IF*/
if(((C)->_capacity/*4*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI]*/
C->_upper=-(1);
}
/*No:FIXED_ARRAY[BASE_CLASS].clear_all*/
void r64add_last(T64* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
C->_upper=((C)->_upper/*8*/)+(1);
}
else if(((C)->_capacity/*4*/)==(0)){
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r65realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((C)->_upper/*8*/)+(1);
}
/*FI]*/
/*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
/*]*/
}
/*No:FIXED_ARRAY[BASE_CLASS].item*/
/*No:FIXED_ARRAY[BASE_CLASS].set_all_with*/
T6 r64valid_index(T64* C,T2 a1){
T6 R=0;
R=((0)<=(a1))&&((a1)<=((C)->_upper/*8*/));
return R;
}
/*No:FIXED_ARRAY[BASE_CLASS].first*/
/*No:FIXED_ARRAY[BASE_CLASS].count*/
/*No:FIXED_ARRAY[BASE_CLASS].lower*/
void r64resize(T64* C,T2 a1){
T0* _elt_default=NULL;
T2 _i=0;
T2 _new_capacity=0;
/*[IF*/
if((a1)<=(/*(IRF4.6count*/((C)->_upper/*8*/)+(1)/*)*/)){
C->_upper=(a1)-(1);
}
else{
_new_capacity=a1;
/*[IF*/
if(((C)->_capacity/*4*/)<(_new_capacity)){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_storage=calloc(_new_capacity,sizeof(T0*));
}
else{
C->_storage=r65realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
}
/*FI]*/
C->_capacity=_new_capacity;
}
/*FI]*/
_new_capacity=(C)->_upper/*8*/;
C->_upper=(a1)-(1);
_i=(C)->_upper/*8*/;
while (!((_i)==(_new_capacity))) {
/*[IRF3.5put*/((C)->_storage/*0*/)[_i]=(_elt_default);
/*]*/
_i=(_i)-(1);
}
}
/*FI]*/
}
T6 r64fast_has(T64* C,T0* a1){
T6 R=0;
R=r64valid_index(C,r64fast_index_of(C,a1));
return R;
}
void r64make(T64* C,T2 a1){
/*[IF*/
if((a1)==(0)){
C->_upper=-(1);
}
else if(((C)->_capacity/*4*/)==(0)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
C->_upper=(a1)-(1);
}
else if(((C)->_capacity/*4*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
C->_upper=(a1)-(1);
}
else{
C->_upper=(a1)-(1);
/*[IRF3.6clear_all*/{T64* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T64* C2=C1;
T0* c1=__value;
r65set_all_with((C2)->_storage/*0*/,c1,(C2)->_upper/*8*/);
}/*]*/
}/*]*/
}
/*FI]*/
}
T2 r64fast_index_of(T64* C,T0* a1){
T2 R=0;
R=r65fast_index_of((C)->_storage/*0*/,a1,(C)->_upper/*8*/);
return R;
}
/*No:FIXED_ARRAY[BASE_CLASS].upper*/
/*No:FIXED_ARRAY[BASE_CLASS].clear*/
/*No:FIXED_ARRAY[BASE_CLASS].capacity*/
/*No:FIXED_ARRAY[BASE_CLASS].put*/
/*No:FIXED_ARRAY[BASE_CLASS].storage*/
void r138with_capacity(T138* C,T2 a1){
/*[IF*/
if(((C)->_capacity/*8*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI]*/
C->_upper=-(1);
}
T0* r138twin(T138* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T138*)R)=M138;
r138copy(((T138*)R),((T0*)C));
return R;
}
void r138add_last(T138* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
C->_upper=((C)->_upper/*12*/)+(1);
}
else if(((C)->_capacity/*8*/)==(0)){
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else{
_new_capacity=(2)*((C)->_capacity/*8*/);
C->_storage=r99realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((C)->_upper/*12*/)+(1);
}
/*FI]*/
/*[IRF3.6put*/{T138* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*12*/;
((C1)->_storage/*4*/)[b2]=(b1);
}/*]*/
}
T0* r138item(T138* C,T2 a1){
T0* R=NULL;
R=((C)->_storage/*4*/)[a1];
return R;
}
/*No:FIXED_ARRAY[EXPRESSION].upper*/
void r138copy(T138* C,T0* a1){
T2 _new_capacity=0;
T2 _other_upper=0;
_other_upper=/*X138upper*/((T2)(((T138*)a1))->_upper/*12*/);
/*[IF*/
if((_other_upper)>=(0)){
_new_capacity=(_other_upper)+(1);
/*[IF*/
if(((C)->_capacity/*8*/)<(_new_capacity)){
C->_capacity=_new_capacity;
C->_storage=calloc(_new_capacity,sizeof(T0*));
}
else if(((C)->_capacity/*8*/)>(0)){
r99clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
}
/*FI]*/
r99copy_from((C)->_storage/*4*/,/*X138storage*/((T99)(((T138*)a1))->_storage/*4*/),_other_upper);
}
else if(((C)->_capacity/*8*/)>(0)){
r99clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
}
/*FI]*/
C->_upper=_other_upper;
}
/*No:FIXED_ARRAY[EXPRESSION].capacity*/
/*No:FIXED_ARRAY[EXPRESSION].storage*/
/*No:FIXED_ARRAY[EXPRESSION].put*/
void r184with_capacity(T184* C,T2 a1){
/*[IF*/
if(((C)->_capacity/*4*/)<(a1)){
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI]*/
C->_upper=-(1);
}
void r184add_last(T184* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
C->_upper=((C)->_upper/*8*/)+(1);
}
else if(((C)->_capacity/*4*/)==(0)){
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r185realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((C)->_upper/*8*/)+(1);
}
/*FI]*/
/*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
/*]*/
}
/*No:FIXED_ARRAY[CLASS_NAME].item*/
/*No:FIXED_ARRAY[CLASS_NAME].upper*/
/*No:FIXED_ARRAY[CLASS_NAME].capacity*/
/*No:FIXED_ARRAY[CLASS_NAME].storage*/
/*No:FIXED_ARRAY[CLASS_NAME].put*/
void r308add_last(T308* C,T0* a1){
T2 _new_capacity=0;
/*[IF*/
if(((C)->_capacity/*4*/)<((r308count(C))+(1))){
/*[IF*/
if(((C)->_capacity/*4*/)==(0)){
C->_capacity=16;
C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
}
else{
_new_capacity=(2)*((C)->_capacity/*4*/);
C->_storage=r309realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI]*/
}
/*FI]*/
C->_upper=((C)->_upper/*8*/)+(1);
/*[IRF3.6put*/{T308* C1=C;
T0* b1=a1;
T2 b2=(C)->_upper/*8*/;
((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
}/*]*/
}
T2 r308count(T308* C){
T2 R=0;
R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
return R;
}
/*No:ARRAY[INDEX_CLAUSE].lower*/
/*No:ARRAY[INDEX_CLAUSE].upper*/
/*No:ARRAY[INDEX_CLAUSE].capacity*/
/*No:ARRAY[INDEX_CLAUSE].put*/
/*No:ARRAY[INDEX_CLAUSE].storage*/